package com.zsgl.domain;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.OneToMany;

@Entity
public class Hotel {

	private static final long serialVersionUID = 1L;
	
	private long id;

	private String name;
	
	@OneToMany()
	private Set<Room> room;
	
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Set<Room> getRoom() {
		if (room == null) {
			//room = new ArrayList<Room>();
			room = new HashSet<Room>();
		}
		return room;
	}

	public void setRoom(Set<Room> room) {
		this.room = room;
	}
	
}
